
<div id="content"">
	
	<h1>Grades - <i><%= @firstname %> <%= @lastname %></i></h1>
	
	<div style="margin:0 50px 0 50px;">
		
		<div style="float:left; border:dashed 1px #CCC; padding:9px; width:600px;">
		
			<table border="0" style="border:dashed 1px #CCC;">
			  <tr>
				<td width="280px"><h3>Assignments</h3></td>
				<td width="150px" style="text-align:center;"><h3>Your Score</h3></td>
				<td width="150px" style="text-align:center;"><h3>Possible</h3></td>
			  </tr>
			<% for assignment in @assignments %>
				<tr class="<%= cycle('list-line-even', 'list-line-odd') %>">  
				<%= if assignment.description != ""
					"<td><a onclick=\"javascript:alert('" + h(assignment.description) + "');\"> " + h(assignment.title) + "</a></td>"
					else
					"<td><a onclick=\"javascript:alert('No description given.');\"> " + h(assignment.title) + "</a></td>"
					end %>					
					<td style="text-align:center;"><i><%= h(@studentgrades[assignment.id].to_s) %></i></td>  
					<td style="text-align:center;"><%= h(assignment.points_possible) %></td>
				</tr>
			<%end%>
			</table>

			<div>
				<table border="0" style="font-weight:bold; font-style:italic;">
				  <!-- insert code to display grade fields here -->
				  <tr>
				  	<td width="280px"></td>
					<td width="150px" style="text-align: left;">Your total score:</td>
					<td width="150px" style="text-align: center;"><%= @total_score %></td>
				  </tr>
				  <tr>
				  	<td width="280px"></td>
				    <td width="150px" style="text-align: left;">Total Possible:</td>
				    <td width="150px" style="text-align: center;"><%= h(@total_possible) %></td>
				  </tr>
				  <tr>
				  	<td width="280px"></td>
				    <td width="150px" style="text-align: left;">Percentage:</td>
				    <td width="150px" style="text-align: center;"><%= h(@total_percentage) %>%</td>
				  </tr>
				</table>
			</div>
		
		</div>
		
	</div>

</div>

